<template>
	<view>
		<view class="mx-2">
			<text class="font-md font-weight-bold">点击复制网址，并在浏览器打开</text>
		</view>
		<view @click="handleCoyp" class="rounded-lg mt-2 mx-2 p-2 bg-hover-light">
			<text class="font">{{url}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				html:'',
				url:''
			}
		},
		onLoad(e) {
			this.url = "https://u345171z68.imdo.co/index2.html?out_trade_no="+ e.out_trade_no
			this.html = uni.getStorageSync("AliPay")
			uni.showModal({
				title: "点击复制网址，并在浏览器打开",
				content: this.url,
				confirm:"复制",
				success: (res) => {
					if (res.confirm) { // 成功跳转修改信息页
						this.handleCoyp()
					}
				}
			})
		},
		methods: {
			handleCoyp(){
				uni.setClipboardData({
					data: this.url,
					success: function () {
						//console.log('success');
					}
				});
			}
		}
	}
</script>

<style>

</style>
